package com.mrd.shiptask_shipowner.fragments;

import com.mrd.shiptask_shipowner.R;
import com.mrd.shiptask_shipowner.constants.HttpConstant;
import com.mrd.shiptask_shipowner.shiareutil.SharePreferenceUtil;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class TopTitleFragment extends Fragment {
	// private Button backBt;
	private TextView titleTv, shipOwnerTv;
	private SharePreferenceUtil spu;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.top_title_content, container,
				false);
		spu = new SharePreferenceUtil(getActivity(), HttpConstant.SAVE_USER);
		initViewAction(view);
		return view;
	}

	private void initViewAction(View view) {
		// TODO Auto-generated method stub
		// backBt = (Button) view.findViewById(R.id.backToBeforeBt);
		titleTv = (TextView) view.findViewById(R.id.topTitleTv);
		shipOwnerTv = (TextView) view.findViewById(R.id.shipOwner);
		shipOwnerTv.setText("您好，" + spu.getShip_name());
	}

}
